package com.lagou.java.utils;

import com.alibaba.druid.pool.DruidDataSource;
import com.lagou.java.annotation.Component;

@Component
public class DruidUtils {

    private static DruidDataSource druidDataSource = new DruidDataSource();

    static {
        druidDataSource.setUrl("jdbc:mysql://localhost:3306/bank");
        druidDataSource.setDriverClassName("com.mysql.jdbc.Driver");
        druidDataSource.setUsername("root");
        druidDataSource.setPassword("123456");
    }


    public static DruidDataSource getInstance () {return druidDataSource;}

}
